let ErrorUtils = require('../utils/error/ErrorUtils');
let AdminVerifyLoginService = require('../service/adminVerifyLogin');
let ResponseUtils = require('../utils/ResponseUtils');
const {infoLogger, errorLogger} = require('../config').logger;

class AdminLoginController {

    static async login(ctx) {
        let data = ctx.request.body;
        infoLogger.info(">>>>>>后端登录接口开始了,请求参数", data);
        let result = await AdminVerifyLoginService.login(data);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async findVerifyList(ctx) {
        let result = await AdminVerifyLoginService.findApplyList(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
    static async verifyApplyInfo(ctx) {
        let result = await AdminVerifyLoginService.verifyApplyInfo(ctx);
        ctx.body = ResponseUtils.builder(result).success().build();
    }
}

module.exports = AdminLoginController;
